<template>
	<view class="page">
		<view class="dept-list">
			<view class="dept-list-item" v-for="(item, index) in deptList" :key="index">
				<text class="name">{{ item.name }}</text>
				<text class="num">已填写{{ item.filled_num }}/{{ item.total_num }}</text>
			</view>
		</view>
	</view>
</template>

<script>
let num1Arr = Array(15)
	.fill('')
	.map(_ => Math.floor(Math.random() * 100) + 15)
let num2Arr = Array(15)
	.fill('')
	.map(_ => Math.floor(Math.random() * 20) + 1)
export default {
	data() {
		return {
			deptList: [
				{ total_num: 1000, filled_num: 60, name: '全部' },
				{ total_num: num1Arr[0], filled_num: num2Arr[0], name: '综合办' },
				{ total_num: num1Arr[1], filled_num: num2Arr[1], name: '人力部' },
				{ total_num: num1Arr[2], filled_num: num2Arr[2], name: '经管部' },
				{ total_num: num1Arr[3], filled_num: num2Arr[3], name: '财务部' },
				{ total_num: num1Arr[4], filled_num: num2Arr[4], name: '合规部' },
				{ total_num: num1Arr[5], filled_num: num2Arr[5], name: '市场部' },
				{ total_num: num1Arr[6], filled_num: num2Arr[6], name: '安质部' },
				{ total_num: num1Arr[7], filled_num: num2Arr[7], name: 'COC' },
				{ total_num: num1Arr[8], filled_num: num2Arr[8], name: '国际部' },
				{ total_num: num1Arr[9], filled_num: num2Arr[9], name: '国内部' },
				{ total_num: num1Arr[10], filled_num: num2Arr[10], name: '货机部' },
				{ total_num: num1Arr[11], filled_num: num2Arr[11], name: '信息部' },
				{ total_num: num1Arr[12], filled_num: num2Arr[12], name: '设备部' },
				{ total_num: num1Arr[13], filled_num: num2Arr[13], name: '物业部' },
				{ total_num: num1Arr[14], filled_num: num2Arr[14], name: '防疫办' }
			]
		}
	},
	onLoad() {},
	onReady() {},
	methods: {}
}
</script>

<style lang="scss" scoped>
@import '~@/common/scss/index.scss';
@import './index.scss';
</style>
